type Age = number
type AgeCreateor = () => Age
function getAge(arg: AgeCreateor) : Age {
  return arg()
}
const res = getAge(function(){
  return 8
})
console.log(res); // 8

// 类型别名也可以是泛型
type Person<T> = { age: T }
let per: Person<string> = { age: '123' }

// 可以就像递归一样引用自己
type Person2<T> = {
  username: T,
  father: boolean,
  children: Person<T>
}
